// 颜色系统
export const colors = {
    // 主色调
    primary: {
        light: '#6B9BFF',
        default: '#5B8EF4',
        dark: '#4B7FE5',
        gradient: ['#5B8EF4', '#4B7FE5'],
    },

    // 辅助色
    secondary: {
        green: {
            light: '#E7F9F1',
            default: '#34C759',
            dark: '#2EB350',
        },
        orange: {
            light: '#FFF4E5',
            default: '#FF9500',
            dark: '#F08300',
        },
        red: {
            light: '#FFEFEF',
            default: '#FF3B30',
            dark: '#E0352B',
        },
    },

    // 中性色
    neutral: {
        white: '#FFFFFF',
        background: '#EEF3FF',
        backgroundGradient: ['#EEF3FF', '#F5F8FF'],
        lightGray: '#F2F2F7',
        gray: '#8E8E93',
        darkGray: '#666666',
        black: '#333333',
    },

    // 透明色
    transparent: {
        white: {
            light: 'rgba(255, 255, 255, 0.1)',
            medium: 'rgba(255, 255, 255, 0.2)',
            high: 'rgba(255, 255, 255, 0.3)',
        },
        black: {
            light: 'rgba(0, 0, 0, 0.1)',
            medium: 'rgba(0, 0, 0, 0.2)',
            high: 'rgba(0, 0, 0, 0.3)',
        },
    },
}

// 阴影样式
export const shadows = {
    small: {
        ios: {
            shadowColor: colors.transparent.black.medium,
            shadowOffset: { width: 0, height: 2 },
            shadowOpacity: 0.2,
            shadowRadius: 4,
        },
        android: {
            elevation: 2,
        },
    },
    medium: {
        ios: {
            shadowColor: colors.transparent.black.medium,
            shadowOffset: { width: 0, height: 4 },
            shadowOpacity: 0.2,
            shadowRadius: 8,
        },
        android: {
            elevation: 4,
        },
    },
    large: {
        ios: {
            shadowColor: colors.transparent.black.high,
            shadowOffset: { width: 0, height: 6 },
            shadowOpacity: 0.3,
            shadowRadius: 12,
        },
        android: {
            elevation: 8,
        },
    },
    colored: (color: string) => ({
        ios: {
            shadowColor: color,
            shadowOffset: { width: 0, height: 4 },
            shadowOpacity: 0.3,
            shadowRadius: 8,
        },
        android: {
            elevation: 5,
        },
    }),
}

// 圆角大小
export const borderRadius = {
    small: 8,
    medium: 16,
    large: 20,
    extraLarge: 24,
    circle: (size: number) => size / 2,
}

// 间距
export const spacing = {
    xs: 4,
    sm: 8,
    md: 12,
    lg: 16,
    xl: 20,
    xxl: 24,
    xxxl: 32,
}

// 字体大小
export const fontSize = {
    xs: 12,
    sm: 14,
    md: 16,
    lg: 18,
    xl: 20,
    xxl: 24,
    xxxl: 32,
}

// 字体权重
export const fontWeight = {
    regular: '400',
    medium: '500',
    semiBold: '600',
    bold: '700',
}

// 导出主题对象
export const theme = {
    colors,
    shadows,
    borderRadius,
    spacing,
    fontSize,
    fontWeight,
}
